
define(['jquery', 'jquerymobile', 'net'], function($, m, net){
    'use strict';

    $('#myCornerHome').on('pageshow', function(e){
        $('#news_footer').show();
    });

    $("#myCornerHome").on( "pagehide", function( event ) {
        $('#news_footer').hide();
    });

    var $page = $('#myCornerHome'),
        lastTapTimestamp = new Date().getTime();

    $page.find('.about-me').on('tap', function(e){
        var nowTimestamp = new Date().getTime();
        if(nowTimestamp - lastTapTimestamp <= 400){
            lastTapTimestamp = nowTimestamp;
            return false;
        }
        // todo: 写入数据?

        $page.find('.ui-header, .ui-content').addClass('bg-frosted-glass');

        $page.find('.about-me-qr-code').stop().fadeIn(200);
    });

    $page.find('.about-me-qr-code').on('tap', function(e){console.log(e);
        var nowTimestamp = new Date().getTime();
        if(nowTimestamp - lastTapTimestamp <= 400){
            lastTapTimestamp = nowTimestamp;
            return false;
        }
        
        $page.find('.ui-header, .ui-content').removeClass('bg-frosted-glass');
        $(this).stop().fadeOut(200);
    });
});